#include <stdio.h>
int main()
{
    int n = 0;
    while (~scanf_s(" %d", &n))
    {
        for (int i = 1; i <= n; i++)
        {
            for (int j = 1; j <= n; j++)
            {
                if (i == n || j == 1 || i == j)
                {
                    printf("* ");
                }
                else
                {
                    printf("  ");
                }
            }
            printf("\n");
        }
    }
    return 0;
}